﻿using QLNH_BUS_WS.QLNH_DAL_WS;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QLNH_BUS_WS
{
    public class MealBUS
    {
        public MealDetailDTO[] GetAllMealDetail(string name, string catalogID)
        {
            QLNH_DAL_WebServiceSoapClient ws = new QLNH_DAL_WebServiceSoapClient();
            return ws.GetAllMealDetail(name, catalogID);
        }

        public FoodReportDTO[] GetCalledMeals(string catalogID)
        {
            return new QLNH_DAL_WebServiceSoapClient().GetCalledMeals(catalogID);
        }

        public FoodReportDTO[] GetCalledMealsByDate(DateTime start, DateTime end, string catalogID)
        {
            return new QLNH_DAL_WebServiceSoapClient().GetCalledMealsByDate(start, end, catalogID);
        }

        public bool AddMeal(MealDTO mealDTO)
        {
            QLNH_DAL_WebServiceSoapClient ws = new QLNH_DAL_WebServiceSoapClient();
            return ws.AddMeal(mealDTO);
        }

        public bool EditMeal(MealDTO mealDTO)
        {
            QLNH_DAL_WebServiceSoapClient ws = new QLNH_DAL_WebServiceSoapClient();
            return ws.EditMeal(mealDTO);
        }

        public bool RemoveMeal(string id)
        {
            QLNH_DAL_WebServiceSoapClient ws = new QLNH_DAL_WebServiceSoapClient();
            return ws.RemoveMeal(id);
        }

        public List<string> GetAllUnit()
        {
            QLNH_DAL_WebServiceSoapClient ws = new QLNH_DAL_WebServiceSoapClient();
            return ws.GetAllUnit();
        }

        public double GetPrice(string mealID)
        {
            return new QLNH_DAL_WebServiceSoapClient().GetPrice(mealID);
        }
    }
}